#ifndef __TRAIN_WD_H_
#define __TRAIN_WD_H_
#include<func.h>
#define BUFFSIZE 1000
#define SENDBUFFSIZE 1000
typedef struct train{
    int length;
    char data[BUFFSIZE];
}train_t;

int sendn(int fd,const void*p ,int len);
void trainSend(char*buff,int peerfd);
void trainSendPlus(char*buff,int peerfd);
void trainRecv(char*buff,int peerfd);

void splitChar(char* from, char* operate, char* operand);
int transferFile(int sfd,const char*filename);
void recvFile(int clientfd,int filename);
void recv_file(int sfd, char *filename);
int recvn(int sfd, void *p, int len);
#endif
